﻿@page
@using Coso.Abp.Theme.AdminLTE.Localization
@using Volo.Abp.UI.Navigation.Localization.Resource;
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.Identity
@using Volo.Abp.Identity.Localization
@using Volo.Abp.Identity.Web.Navigation
@using Volo.Abp.Identity.Web.Pages.Identity.Users
@model Coso.Abp.Theme.AdminLTE.Pages.Identity.Users.IndexModel
@inject IHtmlLocalizer<AdminLTEResource> TL
@inject IHtmlLocalizer<IdentityResource> L
@inject IAuthorizationService Authorization
@inject IPageLayout PageLayout
@{ 
    PageLayout.Content.Title = L["Users"].Value;
    PageLayout.Content.BreadCrumb.Add(L["Menu:IdentityManagement"].Value);
    PageLayout.Content.MenuItemName = IdentityMenuNames.Users; 
}
@section styles {
    <abp-style-bundle name="@typeof(IndexModel).FullName">
        <abp-style src="/Pages/AbpPermissionManagement/permission-management-modal.css" />
    </abp-style-bundle>
}
@section scripts {
    <abp-script-bundle name="@typeof(IndexModel).FullName">
        <abp-script src="/Pages/AbpPermissionManagement/permission-management-modal.js" />
        <abp-script src="/Pages/identity/users/index.js" />
    </abp-script-bundle>
}
@section button{
    @if (await Authorization.IsGrantedAsync(IdentityPermissions.Users.Create))
    {
<abp-button button-type="Primary" id="CreateUser" text="@L["NewUser"].Value" icon="plus" class="btn-sm" />
}
}
@*<abp-card>
    <abp-card-header>
        <h5 class="card-title" data-card-widget="collapse" aria-expanded="false">
            @TL["QueryCondition"]
        </h5>
    </abp-card-header>
    <abp-card-body>
        <abp-row>
            <div class="col">
                <div class="input-group">
                    <input type="search" id="filter" class="form-control">
                    <div class="input-group-append">
                        <button class="btn btn-primary" id="search">
                            <i class="fas fa-search"></i>
                        </button>
                    </div>
                </div>
            </div>
        </abp-row>
    </abp-card-body>
</abp-card>*@
<abp-card >
    <abp-card-header>
        <h5 class="card-title" data-card-widget="collapse" aria-expanded="false">
            @TL["QueryCondition"]
        </h5>
        <div class="card-tools">
            <button type="button" class="btn btn-tool"  data-card-widget="collapse">
                <i class="fas fa-minus"></i>
            </button>
        </div>
    </abp-card-header>
    <abp-card-body>
        <abp-row>
            <abp-column size-sm="_3" class="input-group">
                <div class="input-group-prepend">
                    <span class="input-group-text">@TL["Filter"]</span>
                </div>
                <input type="text" class="form-control" id="filter">
            </abp-column>


            <abp-column size-sm="_3" class="input-group">
                <button type="button" id="search" class="btn btn-primary btn-search">
                    <i class="fa fa-search"></i>
                    @L["Search"].Value
                </button>
            </abp-column>
        </abp-row>
    </abp-card-body>
</abp-card>

<abp-card>
    <abp-card-body>
        <abp-table striped-rows="true" id="IdentityUsersTable">
            <thead Theme="Light">
                <tr>
                    <th>@L["Actions"]</th>
                    <th>@L["UserName"]</th>
                    <th>@L["EmailAddress"]</th>
                    <th>@L["PhoneNumber"]</th>
                    <th>@TL["Name"]</th>
                </tr>
            </thead>
        </abp-table>
    </abp-card-body>
</abp-card>
